////#include<iostream>
////#include<algorithm>
////const int N = 1e6 + 10;
////typedef long long ll;
////ll a[N],b[N];
////using namespace std;
////int main()
////{
////	ll n, k;cin >> n >> k;ll sum = 0;ll MAX = 0,ans = 0;
////	for (int i = 1; i <= n; i++)
////	{
////		cin >> a[i];
////		MAX = max(a[i], MAX);
////	}ll ret = 0;ll i = 0;
////	for ( i = 1; i <= MAX; i++)
////	{
////		sum = 0;
////		for (int j = 1; j <= n; j++)
////		{
////			sum += a[j] / i;
////		}
////		if (sum >= k)
////		{
////			ret = sum;
////			ans = max(ans, i);
////		}
////	}
////	if (sum >= k) cout << ans;
////	else cout << "0" << endl;
////	return 0;
////}
//#include<iostream>
//const int N = 1e6 + 10;
//typedef long long ll;
//ll a[N], b[N];
//using namespace std;
//int main()
//{
//	int n, m;cin >> n >> m;ll MAX;
//	for (int i = 1; i <= n; i++)
//	{
//		cin >> a[i];
//		MAX = max(MAX, a[i]);
//	}ll sum = 0,ans = 0;
//	for (ll i = 1; i <= MAX; i++)
//	{
//		sum = 0;
//		for (int j = 1; j <= n; j++)
//		{
//			sum += a[j] / i;
//		}
//		if (sum >= m) ans = max(ans, i);
//	}
//	if (ans >= m)
//		cout << ans;
//	else cout << 0 << endl;
//	return 0;
//}
#include<iostream>
const int N = 1e8 + 10;
typedef long long ll;
ll a[N];
using namespace std;
int main()
{
	ll n, m;cin >> n >> m;ll MAX = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		MAX = max(MAX, a[i]);
	}
	ll left = 0, right = 1e8;
	while (left < right)
	{
		ll mid = (right + left + 1) / 2;ll sum = 0;
		for (int i = 1; i <= n; i++)
		{
			sum += a[i] / mid;
		}
		if (sum >= m) left = mid;
		else right = mid - 1;
	}
	cout << left << endl;

	return 0;
}